<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8" />
    <title>我的足迹-{eyou:global name='web_name' /}</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <link href="{eyou:global name='web_cmspath'/}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    {eyou:static file="users/skin/css/bootstrap.min.css"/}
    {eyou:static file="users/skin/css/basic.css"/}
    {eyou:static file="users/skin/css/eyoucms.css"/}
    {eyou:static file="users/skin/css/shop.css"/}
    {eyou:static  file="users/skin/css/tb_style.css"/}
    <!-- 新样式 2020-11-25 -->
    {eyou:static file="users/skin/css/element/index.css" /}
    {eyou:static file="users/skin/css/e-user.css" /}
    {eyou:include file="users/skin/css/diy_css.htm"/}

    {eyou:static file="/public/static/common/js/jquery.min.js"/}
    {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
    {eyou:static file="/public/static/common/js/tag_global.js"/}
</head>

<body class="centre shop">
<!-- 头部 -->
{eyou:include file="users/users_header.htm" /}
<!-- END -->

<!-- 头部信息 -->
<div class="ey-header-status">
	<div class="header-status-l">
		<a href="javascript:history.go(-1)"><i class="el-icon-arrow-left"></i></a>
	</div>
	<div class="header-status-m">我的足迹</div>
	<div class="header-status-r">
		<a href="{eyou:url link='user/Users/index' /}"><i class="el-icon-user"></i></a>
	</div>
</div>
<!-- 头部信息结束 -->
<div class="h50"></div>

<div class="ey-container">
	<div class="ey-con">
		<div class="ey-row">
			<!-- 中部 -->
			<div style="overflow-x: scroll;padding: 4px 0;" id="finance-list_wrapper" class="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition">
				<table style="width:100%;">
					
					<tbody>
					{empty name="$eyou.field.data"}
					<tr>
						<td valign="top" colspan="50"><div class="cell tc pt50 pb50"><i class="el-icon-warning red"></i>没有符合条件的记录</div></td>
					</tr>
					{else/}
					{eyou:volist name="$eyou.field.data" id="vo"}
					<tr>
						<td>
							<div class="list_z">
								<label class="checkbox-label release-checkbox checkbox_z">
									<span> &nbsp; </span>
									<input class="checkbox" type="checkbox" name="ids[]" value="{$vo.id}">
									<span class="check-mark"></span>
								</label>
							</div>
						</td>
					    <td>
					        <a  href="{$vo.arcurl}">
					            <div class="list_z">
					                {eyou:empty name='$vo.litpic' /}
					                <img class="pic" src="__PUBLIC__/static/common/images/not_adv.jpg"> 
					                {eyou:else /}
					                <img class="pic" src="{$vo.litpic}">
					                {/eyou:empty}
					            </div>
					        </a>
					    </td>
					    <td>
					         <a  href="{$vo.arcurl}">
					            <div class="list_z">
					               {$vo.title}
					            </div>
					            <div class="list_z"><span class="e_ty">{$vo.typename}</span><span class="e_ty">{$vo.update_time|date='Y-m-d H:i:s',###}</span></div>
					         </a>
					    </td>
						<td >
							<div class="list_z">
								<a href="javascript:void(0);" class="el-button el-button--small delete" style="margin-right: 0;" data-id="{$vo.id}" data-url="{$eyou.field.delurl}" onclick="DelData(this);"><i class="el-icon-delete"></i></a>
							</div>
						</td>
					</tr>
					{/eyou:volist}
					{/empty}
					<tr>
						<td class="border-b-n">
							<div class="list_z">
								<label class="checkbox-label release-checkbox checkbox_z">
									<span> &nbsp; </span>
									<input class="checkbox" type="checkbox" onclick="javascript:$('input[name*=ids]').prop('checked',this.checked);">
									<span class="check-mark"></span>
								</label>
							</div>
						</td>
						<td class="border-b-n">
							<div class="list_z">
								<a class="el-button el-button--primary is-plain el-button--small" href="javascript:void(0);" onclick="BatchDelData(this, 'ids');" data-url="{$eyou.field.delurl}">批量删除</a>
							</div>
						</td>
					</tr>
					</tbody>
				</table>
			</div>
			<div style="text-align: center;">{$page}</div>
			<!-- END -->
		</div>
	</div>
</div>
<script type="text/javascript">
    // 内容查看
    function ArcUrl(obj) {
        window.open($(obj).attr('data-arurl'));
    }
    // 删除单个足迹
    function DelData(obj) {
        layer.confirm('是否删除该足迹？', {
            title: false,
            btn: ['是','否'] //按钮
        }, function(){
            layer_loading('正在处理');
            // 确定
            $.ajax({
                type: "POST",
                url: $(obj).attr('data-url'),
                data: {del_id:$(obj).attr('data-id')},
                dataType: 'json',
                success: function (res) {
                    layer.closeAll();
                    if(res.code == 1){
                        layer.msg(res.msg, {icon: 1});
                        window.location.reload();
                    }else{
                        showErrorAlert(res.msg);
                    }
                },
                error:function(e){
                    layer.closeAll();
                    showErrorAlert(e.responseText);
                }
            });
        }, function(index){
            layer.close(index);
        });
    }
    // 批量删除足迹
    function BatchDelData(obj, name) {
        var a = [];
        $('input[name^='+name+']').each(function(i,o){
            if($(o).is(':checked')){
                a.push($(o).val());
            }
        })
        if(a.length == 0){
            showErrorAlert('请至少选择一项！');
            return;
        }
        // 删除按钮
        layer.confirm('确认批量删除收藏？', {
            title: false,
            btn: ['确定', '取消'] //按钮
        }, function () {
            layer_loading('正在处理');
            $.ajax({
                type: "POST",
                url: $(obj).attr('data-url'),
                data: {del_id:a},
                dataType: 'json',
                success: function (res) {
                    layer.closeAll();
                    if(res.code == 1){
                        layer.msg(res.msg, {icon: 1});
                        window.location.reload();
                    }else{
                        showErrorAlert(res.msg);
                    }
                },
                error:function(e){
                    layer.closeAll();
                    showErrorAlert(e.responseText);
                }
            });
        }, function (index) {
            layer.closeAll(index);
        });
    }
</script>
<!-- END -->